package com.ars.common.dao;



import com.ars.common.utils.DBUtil;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;


public class check {
    public boolean checkUser(String UserID, String password) throws SQLException, ClassNotFoundException {

        String sql = "select * from user where userID = ? and password = ?";
        PreparedStatement ps = DBUtil.getConnection().prepareStatement(sql);
        ps.setString(1, UserID);
        ps.setString(2, password);
        ResultSet rs = ps.executeQuery();

        if (rs.next()) {
            return true;
        } else {
            return false;
        }

    }
}
